<?php
/**
 * All data collected by the wizard and stored in the HTTP session.
 */
class ViregWizardData {

    public static $STEP_OPTIONS = 'options';
    public static $STEP_PAYMENT_TYPE = 'paymentType';
    public static $STEP_SUMMARY = 'summary';

    public static $STEPS; // Initialized below the class declaration
    
    public static $CURRENCY_CODE = 'CZK';
    
    public $step;
    
    public $viSeminar;
    public $optionsForm;
    public $paymentTypeForm;
    public $bankPaymentDiscountHeight = 0;
    public $earlyDiscountHeight = 0;

    public function __construct() {
        $this->step = self::$STEPS[0];
    }
    
    public function goBackToStep($step) {
        $this->step = $step;

        switch ($step) {
            case self::$STEP_OPTIONS :
                $this->paymentTypeForm = null;
                $this->bankPaymentDiscountHeight = null;
            case self::$STEP_PAYMENT_TYPE :
            default :
                break;
        }
    }
}

// This array sets the order of the wizard steps
ViregWizardData::$STEPS = array(
        ViregWizardData::$STEP_OPTIONS,
        ViregWizardData::$STEP_PAYMENT_TYPE,
        ViregWizardData::$STEP_SUMMARY
);
?>
